Optimal. Leaf size=42 \[ A b x+\frac {a C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {4162, 4132, 8,
4130, 3855} \begin {gather*} \frac {a A \sin (c+d x)}{d}+\frac {a C \tanh ^{-1}(\sin (c+d x))}{d}+A b x+\frac {b C \tan (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3855
Rule 4130
Rule 4132
Rule 4162
Rubi steps
\begin {align*} \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {b C \tan (c+d x)}{d}+\int \cos (c+d x) \left (a A+A b \sec (c+d x)+a C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b C \tan (c+d x)}{d}+(A b) \int 1 \, dx+\int \cos (c+d x) \left (a A+a C \sec ^2(c+d x)\right ) \, dx\\ &=A b x+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d}+(a C) \int \sec (c+d x) \, dx\\ &=A b x+\frac {a C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 54, normalized size = 1.29 \begin {gather*} A b x+\frac {a C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a A \cos (d x) \sin (c)}{d}+\frac {a A \cos (c) \sin (d x)}{d}+\frac {b C \tan (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 49, normalized size = 1.17
method | result | size |
derivativedivides | \(\frac {A b \left (d x +c \right )+C b \tan \left (d x +c \right )+A \sin \left (d x +c \right ) a +a C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(49\) |
default | \(\frac {A b \left (d x +c \right )+C b \tan \left (d x +c \right )+A \sin \left (d x +c \right ) a +a C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(49\) |
risch | \(A b x -\frac {i a A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i a A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i C b}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(100\) |
norman | \(\frac {A b x +A b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {2 \left (a A -C b \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 \left (a A +C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-A b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-A b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4 a A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {a C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(185\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 59, normalized size = 1.40 \begin {gather*} \frac {2 \, {\left (d x + c\right )} A b + C a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A a \sin \left (d x + c\right ) + 2 \, C b \tan \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 86 vs.
\(2 (42) = 84\).
time = 2.82, size = 86, normalized size = 2.05 \begin {gather*} \frac {2 \, A b d x \cos \left (d x + c\right ) + C a \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - C a \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a \cos \left (d x + c\right ) + C b\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 119 vs.
\(2 (42) = 84\).
time = 0.47, size = 119, normalized size = 2.83 \begin {gather*} \frac {{\left (d x + c\right )} A b + C a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - C a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.51, size = 91, normalized size = 2.17 \begin {gather*} \frac {A\,a\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {C\,b\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________